Oops, only show 'Connect to server' if the caller enabled it
authorFederico Mena Quintero <federico@gnome.org>
Sun, 21 Apr 2013 22:20:46 +0000 (18:20 -0400)
committerFederico Mena Quintero <federico@gnome.org>
Sun, 21 Apr 2013 22:20:46 +0000 (18:20 -0400)
gtk/gtkplacessidebar.c

index fd18597de398de2bf93b2d027f9e92f10c8468fc..cd8cdd6c0f9bdff1df4689d71d984b5f6931b089 100644 (file)
@@ -1075,13 +1075,15 @@ update_places (GtkPlacesSidebar *sidebar)
                   _("Browse the contents of the network"));
        g_object_unref (icon);
 
-       icon = g_themed_icon_new (ICON_NAME_NETWORK_SERVER);
-       add_place (sidebar, PLACES_CONNECT_TO_SERVER,
-                  SECTION_NETWORK,
-                  _("Connect to Server"), icon, NULL,
-                  NULL, NULL, NULL, 0,
-                  _("Connect to a network server address"));
-       g_object_unref (icon);
+       if (sidebar->show_connect_to_server) {
+               icon = g_themed_icon_new (ICON_NAME_NETWORK_SERVER);
+               add_place (sidebar, PLACES_CONNECT_TO_SERVER,
+                          SECTION_NETWORK,
+                          _("Connect to Server"), icon, NULL,
+                          NULL, NULL, NULL, 0,
+                          _("Connect to a network server address"));
+               g_object_unref (icon);
+       }
 
        network_volumes = g_list_reverse (network_volumes);
        for (l = network_volumes; l != NULL; l = l->next) {